package com.bw.zg3.Log

import androidx.lifecycle.MutableLiveData
import com.bw.base.entity.UserBean
import com.bw.base.entity.ZCEntityResUlt
import com.bw.base.mvvm.BaseViewModel
import com.bw.base.net.ApiServer
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class UserViewModel @Inject constructor(val apiServer: ApiServer) :BaseViewModel(){
val LoginData=MutableLiveData<UserBean>()
    fun getLog(username:String,password:String){
        httpReguest({apiServer.getLog(username,password)},LoginData::postValue)
    }
    val ZCSuccess=MutableLiveData<ZCEntityResUlt>()
    fun getZC(username:String,password:String){
        httpReguest({apiServer.getZc(username, password)},ZCSuccess::postValue)
    }

}